﻿using BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Dryricenet
{
    public partial class home_Food : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Staple();
            }
        }
        public void Staple() {
            DataList2.DataSource = foodBLL.stapleBLL();
            DataList2.DataBind();
        }
        //主食
        protected void Button1_Click(object sender, EventArgs e)
        {
            Staple();
        }
        //凉菜
        protected void Button2_Click(object sender, EventArgs e)
        {
            DataList2.DataSource = foodBLL.coldBLL();
            DataList2.DataBind();
        }
        //汤
        protected void Button3_Click(object sender, EventArgs e)
        {
            DataList2.DataSource = foodBLL.soupBLL();
            DataList2.DataBind();
        }
        //地方菜系
        protected void Button4_Click(object sender, EventArgs e)
        {
            DataList2.DataSource = foodBLL.regionalBLL();
            DataList2.DataBind();
        }
        //甜点
        protected void Button5_Click(object sender, EventArgs e)
        {
            DataList2.DataSource = foodBLL.dessertBLL();
            DataList2.DataBind();
        }
        //火锅
        protected void Button6_Click(object sender, EventArgs e)
        {
            DataList2.DataSource = foodBLL.hotBLL();
            DataList2.DataBind();
        }
        //烧烤
        protected void Button7_Click(object sender, EventArgs e)
        {
            DataList2.DataSource = foodBLL.barbecueBLL();
            DataList2.DataBind();
        }
        //海鲜
        protected void Button8_Click(object sender, EventArgs e)
        {
            DataList2.DataSource = foodBLL.seafoodBLL();
            DataList2.DataBind();
        }
        //饮料
        protected void Button9_Click(object sender, EventArgs e)
        {
            DataList2.DataSource = foodBLL.drinkBLL();
            DataList2.DataBind();
        }
    }
}